package per.lee.spingboothelper.db.service;

import java.util.List;

import org.springframework.stereotype.Service;

import lombok.extern.slf4j.Slf4j;
import per.lee.spingboothelper.db.dao.SlowSqlDao;
import per.lee.spingboothelper.db.model.ShowSql;
import per.lee.spingboothelper.db.model.SlowSqlModel;

@Slf4j
@Service
public class SlowSqlService {

	private SlowSqlDao slowSqlDao = new SlowSqlDao();

	public List<SlowSqlModel> findSlowList(String date) {
		List<ShowSql> slowSqlList = slowSqlDao.findSlowSql(date);
		return slowSqlDao.findExplain(slowSqlList);
	}
	
	public static void main(String[] args) {
		SlowSqlService slowSqlService = new SlowSqlService();
		List<SlowSqlModel> slowList = slowSqlService.findSlowList("2019-03-10");
		
	}
}
